<p class="Paragraph"><help:paragraphinfo state="U" number="2"/>Declares and defines a subroutine in a <help:key-word value="DLL (Dynamic Link Library)" tag="kw66561_2"/>DLL (Dynamic Link Library) that you want to <text:s text:c="" xmlns:text="http://openoffice.org/2000/text"/>execute from <help:productname>%PRODUCTNAME</help:productname> Basic.</p>
<p class="Paragraph"><help:paragraphinfo state="U" number="8" xmlns:help="http://openoffice.org/2000/help"/><span class="T1">Name:</span> A different name than defined in the DLL, to call the subroutine from <help:productname xmlns:help="http://openoffice.org/2000/help">%PRODUCTNAME</help:productname> Basic.</p>
<p class="Paragraph"><help:paragraphinfo state="U" number="9" xmlns:help="http://openoffice.org/2000/help"/><span class="T1">Aliasname</span>: Name of the subroutine as defined in the DLL.</p>
<p class="Paragraph"><help:paragraphinfo state="U" number="10" xmlns:help="http://openoffice.org/2000/help"/><span class="T1">Libname:</span> File or system name of the DLL. This library is automatically loaded the first time the function is used.</p>
<p class="Paragraph"><help:paragraphinfo state="U" number="11" xmlns:help="http://openoffice.org/2000/help"/><span class="T1">Argumentlist:</span> List of parameters representing arguments that are passed to the procedure when it is called. The type and number of parameters is dependent on the executed procedure.</p>
<p class="Paragraph"><help:paragraphinfo state="U" number="12" xmlns:help="http://openoffice.org/2000/help"/><span class="T1">Type:</span> Defines the data type of the value that is returned by a function procedure. You can exclude this parameter if a type-declaration character is entered after the name.</p>
<p class="TextInTable"><draw:image draw:name="Icon0" svg:desc="This icon marks text containing important information on data and system security." svg:pixelx="32" svg:pixely="32" svg:width="0.847cm" svg:height="0.847cm" xlink:href="65640" draw:filter-name="" xmlns:draw="http://openoffice.org/2000/drawing" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"/></p>
<p class="TextInTable"><help:paragraphinfo state="U" number="13" xmlns:help="http://openoffice.org/2000/help"/>To pass a parameter to a subroutine as a value instead of as a reference, the parameter must be indicated by the keyword <span class="T1">ByVal</span>.</p>
<p class="PropText"><help:paragraphinfo state="U" number="15" xmlns:help="http://openoffice.org/2000/help"/>Declare Sub MyMessageBeep Lib "user32.dll" Alias "MessageBeep" ( long )</p>